package com.wicket.okrbff.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrbff.biz.service.GridCalculateService;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrapp.integration.FwAppTaskClient;
import com.wicket.okrcomponent.integration.FwCompConfSchemeClient;
import com.wicket.okrapp.integration.FwAppGridCalculateClient;
import com.wicket.okrcalc.integration.FwCalcGridCalculateClient;
import com.wicket.okrapp.integration.dto.ImplementReportingTaskCanBeSubmitComRespDto;
import com.wicket.okrapp.integration.dto.ImplementReportingTaskCanBeSubmitComReqDto;
import com.wicket.okrapp.integration.dto.CommitReportingTaskComRespDto;
import com.wicket.okrapp.integration.dto.CommitReportingTaskComReqDto;
import com.wicket.okrcomponent.integration.dto.QueryItemMatchResultToAnswerDetailComRespDto;
import com.wicket.okrcomponent.integration.dto.QueryItemMatchResultToAnswerDetailComReqDto;
import com.wicket.okrapp.integration.dto.ApproveSucceedReportTaskComRespDto;
import com.wicket.okrapp.integration.dto.ApproveSucceedReportTaskComReqDto;
import com.wicket.okrcalc.integration.dto.CalculateReportTaskComRespDto;
import com.wicket.okrcalc.integration.dto.CalculateReportTaskComReqDto;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrframework.integration.FwBaseDivineDataClient;
import com.wicket.okrapp.integration.FwAppTargetCycleClient;
import com.wicket.okrapp.integration.FwAppEvaThemeClient;
import com.wicket.okrapp.integration.FwAppConventionalSchedulingClient;
import com.wicket.okrapp.integration.dto.ApproveSucceedTaskReportPermissionVerificationComRespDto;
import com.wicket.okrapp.integration.dto.ApproveSucceedTaskReportPermissionVerificationComReqDto;
import com.wicket.okrapp.integration.dto.QueryProcExecuteCycleStageDetailComRespDto;
import com.wicket.okrapp.integration.dto.QueryProcExecuteCycleStageDetailComReqDto;
import com.wicket.okrapp.integration.dto.QueryEvaTempDetailRespDto;
import com.wicket.okrapp.integration.dto.QueryEvaTempDetailReqDto;
import com.wicket.okrapp.integration.dto.QueryStageCurrentCycleDetailComRespDto;
import com.wicket.okrapp.integration.dto.QueryStageCurrentCycleDetailComReqDto;
import java.util.concurrent.Callable;
import com.wicket.okrbff.common.util.CommonFunctionHelper;
import com.wicket.okrapp.integration.dto.ImplementCalcEvaTempAllContentDataComRespDto;
import com.wicket.okrapp.integration.dto.ImplementCalcEvaTempAllContentDataComReqDto;
import com.wicket.okrapp.integration.FwAppProgressPublicTechnicaCapacityClient;
import com.wicket.okrapp.integration.dto.ImplementJudgmentEentryConditionsStrongSupportComRespDto;
import com.wicket.okrapp.integration.dto.ImplementJudgmentEentryConditionsStrongSupportComReqDto;
import com.wicket.okrapp.integration.dto.ImplementRecalcEvaTempAllStandardDataComRespDto;
import com.wicket.okrapp.integration.dto.ImplementRecalcEvaTempAllStandardDataComReqDto;
import com.wicket.okrapp.integration.dto.ImplementExamineReportTaskComRespDto;
import com.wicket.okrapp.integration.dto.ImplementExamineReportTaskComReqDto;
import com.wicket.okrapp.integration.FwAppVirtualOrgClient;
import com.wicket.okrapp.integration.dto.ImplementJudgePersonLiableIsDirectorComRespDto;
import com.wicket.okrapp.integration.dto.ImplementJudgePersonLiableIsDirectorComReqDto;
import com.wicket.okrapp.integration.FwAppIndexSystemClient;
import com.wicket.okrapp.integration.dto.ObtainTargetContNatureInfoComRespDto;
import com.wicket.okrapp.integration.dto.ObtainTargetContNatureInfoComReqDto;
import com.wicket.okrapp.integration.FwAppExecuteProgressClient;
import com.wicket.okrapp.integration.dto.ImplementExecuteProgressOperationJudgeComRespDto;
import com.wicket.okrapp.integration.dto.ImplementExecuteProgressOperationJudgeComReqDto;
import com.wicket.okrapp.integration.dto.TempStorageTaskReportPermissionVerificationComRespDto;
import com.wicket.okrapp.integration.dto.TempStorageTaskReportPermissionVerificationComReqDto;
import com.wicket.okrapp.integration.dto.ImplementTempStorageReportTaskVerifyComRespDto;
import com.wicket.okrapp.integration.dto.ImplementTempStorageReportTaskVerifyComReqDto;
import com.wicket.okrapp.integration.dto.ImplementSubmitReportTaskVerifyComRespDto;
import com.wicket.okrapp.integration.dto.ImplementSubmitReportTaskVerifyComReqDto;
import com.wicket.okrapp.integration.FwAppMessageClient;
import com.wicket.okrapp.integration.dto.QueryTaskDetailComRespDto;
import com.wicket.okrapp.integration.dto.QueryTaskDetailComReqDto;
import com.wicket.okrapp.integration.dto.ImplementDataForLocationMessageHandleComRespDto;
import com.wicket.okrapp.integration.dto.ImplementDataForLocationMessageHandleComReqDto;
import com.wicket.okrapp.integration.dto.ImplementReportTaskPositionMsgHandleComRespDto;
import com.wicket.okrapp.integration.dto.ImplementReportTaskPositionMsgHandleComReqDto;
import com.wicket.okrapp.integration.dto.ImplementReportTaskMessagePrepareComRespDto;
import com.wicket.okrapp.integration.dto.ImplementReportTaskMessagePrepareComReqDto;
import com.wicket.okrapp.integration.dto.ImplementSendTargetContGroupMsgComRespDto;
import com.wicket.okrapp.integration.dto.ImplementSendTargetContGroupMsgComReqDto;
import com.wicket.okrapp.integration.FwAppTargetContentClient;
import com.wicket.okrapp.integration.dto.ImplementCanReceptionCycleAnalysisComRespDto;
import com.wicket.okrapp.integration.dto.ImplementCanReceptionCycleAnalysisComReqDto;
import com.wicket.okrapp.integration.dto.ImplementTaskLoopHandleReportTaskLocationMessagePushComRespDto;
import com.wicket.okrapp.integration.dto.ImplementTaskLoopHandleReportTaskLocationMessagePushComReqDto;
import com.wicket.okrapp.integration.dto.QueryVirtualOrgSpecMemberListComRespDto;
import com.wicket.okrapp.integration.dto.QueryVirtualOrgSpecMemberListComReqDto;
import com.wicket.okrapp.integration.dto.SpecMemberChannelDto;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrapp.integration.dto.CircleDesignatedPersonDto;
import com.wicket.okrbff.common.exception.BizException;
import com.wicket.okrapp.integration.dto.ImplementReportTaskMessagePrepareNewComRespDto;
import com.wicket.okrapp.integration.dto.ImplementReportTaskMessagePrepareNewComReqDto;
import com.wicket.okrapp.integration.dto.ImplementCreateMsgAndNumComRespDto;
import com.wicket.okrapp.integration.dto.ImplementCreateMsgAndNumComReqDto;
import com.wicket.okrapp.integration.dto.RefreshReportTaskStatusMsgAndMsgNumComRespDto;
import com.wicket.okrapp.integration.dto.RefreshReportTaskStatusMsgAndMsgNumComReqDto;
import com.wicket.okrapp.integration.FwAppCycleStageDataClient;
import com.wicket.okrapp.integration.dto.ImplementCycleStageDataMessageComRespDto;
import com.wicket.okrapp.integration.dto.ImplementCycleStageDataMessageComReqDto;
import com.wicket.okrapp.integration.dto.ImplementExamineReportTaskBizHandleComRespDto;
import com.wicket.okrapp.integration.dto.ImplementExamineReportTaskBizHandleComReqDto;
import com.wicket.okrapp.integration.FwAppFinanceClient;
import com.wicket.okrapp.integration.dto.ImplementRefreshFullTemplateFinancialDataComRespDto;
import com.wicket.okrapp.integration.dto.ImplementRefreshFullTemplateFinancialDataComReqDto;
import com.wicket.okrapp.integration.dto.DocumentDto;
import com.wicket.okrapp.integration.dto.CycleStageDataAttDocDto;
import com.wicket.okrapp.integration.FwAppTargetCalcClient;
import com.wicket.okrapp.integration.dto.ImplementExaReportTaskAndCalcCurAndAnceStdDataComRespDto;
import com.wicket.okrapp.integration.dto.ImplementExaReportTaskAndCalcCurAndAnceStdDataComReqDto;
import com.wicket.okrapp.integration.dto.JudgeCurReporterIsPersonLiableComRespDto;
import com.wicket.okrapp.integration.dto.JudgeCurReporterIsPersonLiableComReqDto;

/**
 * @author ：
 * @date ：
 *
 * 
 * @version 1.0
 */
@Api(value = "GridCalculate", tags = { "GridCalculate" })
@RestController
// @RequestMapping("/oms/gridCalculate/")
public class GridCalculateController {

  @Autowired
  GridCalculateService gridCalculateService;
/**
   * B3-提交汇报任务
   * gen by moon at 6/1/2023, 7:53:38 PM
   */
    @PostMapping("/oms/gridCalculate/commitReportTask")
    @ApiOperation(value = "B3-提交汇报任务", response = OkrResult.class)
    public OkrResult<BffCommitReportTaskRespDto> commitReportTask(@RequestBody(required=false) @Validated BffCommitReportTaskReqDto reqDTO){
        return OkrResult.success(gridCalculateService.commitReportTask(reqDTO));
    }
/**
   * B3-审核通过汇报任务
   * gen by moon at 6/1/2023, 8:06:30 PM
   */
    @PostMapping("/oms/gridCalculate/approveSucceedReportTask")
    @ApiOperation(value = "B3-审核通过汇报任务", response = OkrResult.class)
    public OkrResult<BffApproveSucceedReportTaskRespDto> approveSucceedReportTask(@RequestBody(required=false) @Validated BffApproveSucceedReportTaskReqDto reqDTO){
        return OkrResult.success(gridCalculateService.approveSucceedReportTask(reqDTO));
    }
/**
   * B3-执行全模板内容计算
   * gen by moon at 6/13/2023, 9:57:25 PM
   */
    @PostMapping("/oms/gridCalculate/implementCalcEvaTempAllContentDatas")
    @ApiOperation(value = "B3-执行全模板内容计算", response = OkrResult.class)
    public OkrResult<BffImplementCalcEvaTempAllContentDatasRespDto> implementCalcEvaTempAllContentDatas(@RequestBody(required=false) @Validated BffImplementCalcEvaTempAllContentDatasReqDto reqDTO){
        return OkrResult.success(gridCalculateService.implementCalcEvaTempAllContentDatas(reqDTO));
    }
/**
   * B3-执行全模版标准数据重新计算
   * gen by moon at 6/13/2023, 9:57:34 PM
   */
    @PostMapping("/oms/gridCalculate/implementRecalcAllStandardData")
    @ApiOperation(value = "B3-执行全模版标准数据重新计算", response = OkrResult.class)
    public OkrResult<BffImplementRecalcAllStandardDataRespDto> implementRecalcAllStandardData(@RequestBody(required=false) @Validated BffImplementRecalcAllStandardDataReqDto reqDTO){
        return OkrResult.success(gridCalculateService.implementRecalcAllStandardData(reqDTO));
    }
}
